<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_EN" lang="en_En">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<script src="<?php echo base_url()?>js/jquery-1.6.4.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="<?php echo base_url()?>js/tiny_mce/tiny_mce.js"></script>
		<link rel="stylesheet" href="<?php echo base_url()?>css/styleadmin.css" type="text/css"/>
		<title><?php echo $title ?></title>
		<base href="<?php echo base_url()?>" />
		<script type="text/javascript">
			tinyMCE.init({
				// General options
				mode : "textareas",
				theme : "advanced",
				plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
		
				// Theme options
				theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
				theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
				theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
				theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				theme_advanced_statusbar_location : "bottom",
				theme_advanced_resizing : true,
		
				// Example content CSS (should be your site CSS)
				content_css : "css/content.css",
		
				// Drop lists for link/image/media/template dialogs
				template_external_list_url : "lists/template_list.js",
				external_link_list_url : "lists/link_list.js",
				external_image_list_url : "lists/image_list.js",
				media_external_list_url : "lists/media_list.js",
		
				// Style formats
				style_formats : [
					{title : 'Bold text', inline : 'b'},
					{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
					{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
					{title : 'Example 1', inline : 'span', classes : 'example1'},
					{title : 'Example 2', inline : 'span', classes : 'example2'},
					{title : 'Table styles'},
					{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
				],
		
				// Replace values for the template plugin
				template_replace_values : {
					username : "Some User",
					staffid : "991234"
				}
			});
		</script>
	</head>
	<body id="client-list">
		<div id="wrapper">
			<div id="header-wrapper">
				<?php include_once('include/header_admin.php') ?>
			</div>
			<div id="content">
				<h2 class="page-header">Admin's profile</h2>
				<div class="profile-form">
					<div class="create-client-form-error">
						<?php echo validation_errors(); ?>
						<?php
							if(isset($errorArray)){
								foreach ($errorArray as $value){
						?>
							<p><?php echo $value ?></p>
						<?php
								}
							}
						?>
					</div>
					<?php echo form_open('admin/profile'); ?>
						<div class="profile-field">
							<div class="profile-field-left">
								<div class="profile-label">
									<label for="first-name">Title</label>
								</div>
								<div class="profile-input">
									<input type="text" name="title" value="<?php if(isset($validate)&& $validate == false){ echo $adminInfor->title;}else{ echo set_value('title');} ?>" />
								</div>
								<div class="profile-label">
									<label for="first-name">First name</label>
								</div>
								<div class="profile-input">
									<input type="text" name="first-name" value="<?php if(isset($validate)&& $validate == false){ echo $adminInfor->first_name;}else{ echo set_value('first-name');} ?>" />
								</div>
								<div class="profile-label">
									<label for="last-name">Last name</label>
								</div>
								<div class="profile-input">
									<input type="text" name="last-name" value="<?php if(isset($validate)&& $validate == false){ echo $adminInfor->last_name;}else{ echo set_value('last-name');} ?>" />
								</div>
							</div>
							<div class="profile-field-right">
								<div class="profile-label">
									<label for="last-name">Email</label>
								</div>
								<div class="profile-input">
									<input type="text" name="email" value="<?php if(isset($validate)&& $validate == false){ echo $adminInfor->email;}else{ echo set_value('email');} ?>" />
								</div>
								<div class="profile-label">
									<label for="last-name">New password</label>
								</div>
								<div class="profile-input">
									<input type="password" name="new-password" value="" />
								</div>
								<div class="profile-label">
									<label for="last-name">Confirm password</label>
								</div>
								<div class="profile-input">
									<input type="password" name="confirm-password" value="" />
								</div>
							</div>
							<div class="clear"></div>
							<div class="dr-note">
								<label>Thank you text</label><br/>
								<textarea name="dr-note" rows="8" cols="50"><?php if(isset($validate)&& $validate == false){ echo $adminInfor->dr_note;}else{ echo $drNote;} ?></textarea>
							</div>
							
							<div class="profile-submit">
								<input type="submit" id="update-profile" name="submit" value="Submit" />
							</div>
							<div class="clear"></div>
						</div>
					</form>
				</div>
			</div>
			<div id="footer-wrapper">
				<?php include_once('include/footer_admin.php') ?>
			</div>
		</div>
	</body>
</html>